﻿<%@ WebHandler Language="C#" Class="Handler" %>
using System;
using System.Web;
using System.Web.SessionState;
public class Handler : IHttpHandler, IReadOnlySessionState
{
    
    public void ProcessRequest (HttpContext context) {
        string opType = context.Request.Form["OpType"];
        AjaxMethodHelper controler = new AjaxMethodHelper(context);
       
        string rtnMessage = string.Empty;
        switch (opType)
        {
            case "SaveCourses":
                rtnMessage = controler.SaveCourses();
                break;
            case "u":
                rtnMessage = controler.ChkCourse(opType);
                break;
            case "a":
                rtnMessage = controler.ChkCourse(opType);
                break;
            case "CheckUser":
                rtnMessage = controler.CheckUser();
                break;
            case  "SaveUser":
                rtnMessage = controler.SaveUser();
                break;
            case "CheckSVR":
                rtnMessage = controler.CheckSVR();
                break;
            case  "SaveFormatTime":
                rtnMessage = controler.SaveFormatTime();
                break;
                

        }
       
               
        
        context.Response.ContentType = "text/plain";
        context.Response.Write(rtnMessage);
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}